<% content_for :title do %>
  <%=t('message.other')%>
<% end %>

<section id="conversation">
  <%= render partial: 'toolbar/messages' %>

  <%= render :partial => 'show' %>

  <%= javascript_tag do %>
$('.cont_conversation').validate({errorClass: "validation_error"});
<% unless @box.eql?'trash' %>
  $("#body").cleditor({
    width:493,
    controls:  "<%= SocialStream.cleditor_controls %>"    
  });

		var message_hash = window.location.hash.match(/^.*message_(\d+).*$/);
		if (message_hash && message_hash.length > 0){
			$.scrollTo('#message_' + message_hash[1] ,1500,{axis:'y'});
		}else{
			$.scrollTo('#message_<%= @conversation.last_message.id %>',1500,{axis:'y'});		
		}
<% else %>
		var message_hash = window.location.hash.match(/^.*message_(\d+).*$/);
		if (message_hash && message_hash > 0){
			$.scrollTo('#message_' + message_hash[1] ,1500,{axis:'y'});
		}else{
			$.scrollTo('#message_<%= @conversation.last_message.id %>',1500,{axis:'y'});	
		}
<% end %>
<% end %>
</section>
